From: Kunal Mehta Date: Tue, 23 May 2017 22:10:17 +0000 (-0700) Subject: auth: Avoid deprecated wfGlobalCacheKey() X-Git-Tag: 1.31.0-rc.0~3163 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=705cb9bb264084fbbd067d17ccb5c61ee71a5883;p=lhc%2Fweb%2Fwiklou.git auth: Avoid deprecated wfGlobalCacheKey() Change-Id: I2d6fa73fe857a0495df13aa25071e69b1ec2ba70 --- diff --git a/includes/auth/Throttler.php b/includes/auth/Throttler.php index 8a10ecb065..3125bd3fd8 100644 --- a/includes/auth/Throttler.php +++ b/includes/auth/Throttler.php @@ -127,7 +127,7 @@ class Throttler implements LoggerAwareInterface { continue; } - $throttleKey = wfGlobalCacheKey( 'throttler', $this->type, $index, $ipKey, $userKey ); + $throttleKey = $this->cache->makeGlobalKey( 'throttler', $this->type, $index, $ipKey, $userKey ); $throttleCount = $this->cache->get( $throttleKey ); if ( !$throttleCount ) { // counter not started yet @@ -170,7 +170,7 @@ class Throttler implements LoggerAwareInterface { $userKey = $username ? md5( $username ) : null; foreach ( $this->conditions as $index => $specificThrottle ) { $ipKey = isset( $specificThrottle['allIPs'] ) ? null : $ip; - $throttleKey = wfGlobalCacheKey( 'throttler', $this->type, $index, $ipKey, $userKey ); + $throttleKey = $this->cache->makeGlobalKey( 'throttler', $this->type, $index, $ipKey, $userKey ); $this->cache->delete( $throttleKey ); } }